/*
 * Copyright (C) 2009 Christoph Caks
 *
 * This file is part of GLWAK.
 *
 * GLWAK is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GLWAK is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with GLWAK.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * ContextConfiguration.h
 *
 *  Created on: 11.07.2009
 *      Author: Christoph Caks
 */

#ifndef CONTEXTCONFIGURATION_H_
#define CONTEXTCONFIGURATION_H_

#include "OpenGL.h"

namespace glwak {

/**
 * represents a ContextConfiguration.
 *
 * To initialize a Context a ContextConfiguration is needed,
 */
class ContextConfiguration {
public:

	/**
	 * default constructor.
	 *
	 * initializes the ContextConfiguration with default values.
	 */
	ContextConfiguration();

	/**
	 * version constructor.
	 *
	 * this constructor lets you only choose the OpenGL version.
	 *
	 * @param _majorVersion
	 * @param _minorVersion
	 */
	ContextConfiguration( GLuint _majorVersion, GLuint _minorVersion );

	/**
	 * yet another constructor.
	 *
	 * @param _depthBits
	 * @param _stencilBits
	 * @param _antialiasingLevel
	 */
	ContextConfiguration( GLuint _depthBits, GLuint _stencilBits, GLuint _antialiasingLevel );

	/**
	 * full constructor.
	 *
	 * this constructor gives full control over all attributes.
	 *
	 * @param _depthBits
	 * @param _stencilBits
	 * @param _antialiasingLevel
	 * @param majorVersion
	 * @param minorVersion
	 * @return
	 */
	ContextConfiguration( GLuint _depthBits, GLuint _stencilBits, GLuint _antialiasingLevel, GLuint _majorVersion, GLuint _minorVersion );
	virtual ~ContextConfiguration();

	void setDepthBits( GLuint _depthBits );
	void setStencilBits( GLuint _stencilBits );
	void setAntialiasingLevel( GLuint _antialiasingLevel );

	void setMajorVersion( GLuint _majorVersion );
	void setMinorVersion( GLuint _minorVersion );

	GLuint getDepthBits();
	GLuint getStencilBits();
	GLuint getAntialiasingLevel();

	GLuint getMajorVersion();
	GLuint getMinorVersion();

private:
    GLuint depthBits;			///< Bits of the depth buffer
    GLuint stencilBits;			///< Bits of the stencil buffer
    GLuint antialiasingLevel;	///< Level of antialiasing

    GLuint majorVersion;		///< Major version
    GLuint minorVersion;		///< Minor version
};

} // namespace glwak

#endif /* CONTEXTCONFIGURATION_H_ */
